CSharpTest.Net
GetEnumerator Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Collections Namespace > LurchTable.ValueCollection<TKey,TValue> Class : GetEnumerator Method

Glossary Item Box

Returns an enumerator that iterates through the collection.

Syntax

Visual Basic (Declaration) 
Public Function GetEnumerator() As LurchTable(Of TKey,TValue)
C# 
public LurchTable<TKey,TValue> GetEnumerator()

Example

Library/Library.Test/TestLurchTable.cs

C#Copy Code
var sample = GetSample();
var test = CreateSample(sample);
int ix = 0;
foreach (var value in test.Values)
    Assert.AreEqual(sample[ix++].Value, value);
VB.NETCopy Code
Dim sample As var = GetSample()
Dim test As var = CreateSample(sample)
Dim ix As Integer = 0
For Each value As var In test.Values
    Assert.AreEqual(sample(System.Math.Max(System.Threading.Interlocked.Increment(ix),ix - 1)).Value, value)
Next

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys